﻿using System;
using System.Collections.Generic;

namespace NanoMvvm
{
    public interface IEventContainer<TSender, TArgs>
        where TSender : class
        where TArgs : EventArgs
    {
        bool AddHandler(Action<TSender, TArgs> handler);
        bool RemoveHandler(Action<TSender, TArgs> handler);

        void InvokeAll(TSender sender = null, TArgs args = null);

        IEnumerable<Action<TSender, TArgs>> GetHandlers();

        void Clear();
    }
}